/* ---------------------------------------------------------------------- */
/* Script generated with: DeZign for Databases v6.3.2                     */
/* Target DBMS:           MS SQL Server 2008                              */
/* Project file:          Quizz.dez                                       */
/* Project name:                                                          */
/* Author:                                                                */
/* Script type:           Database drop script                            */
/* Created on:            2012-10-16 11:52                                */
/* ---------------------------------------------------------------------- */


/* ---------------------------------------------------------------------- */
/* Drop foreign key constraints                                           */
/* ---------------------------------------------------------------------- */

ALTER TABLE [Menu] DROP CONSTRAINT [Menu_Menu]
GO


ALTER TABLE [Question] DROP CONSTRAINT [Question_Question]
GO


ALTER TABLE [Question] DROP CONSTRAINT [Subject_Question]
GO


ALTER TABLE [Question] DROP CONSTRAINT [User_Question]
GO


ALTER TABLE [Answer] DROP CONSTRAINT [Question_Answer]
GO


ALTER TABLE [TestSubject] DROP CONSTRAINT [Subject_TestSubject]
GO


ALTER TABLE [TestSubject] DROP CONSTRAINT [Test_TestSubject]
GO


ALTER TABLE [TestQuestion] DROP CONSTRAINT [Question_TestQuestion]
GO


ALTER TABLE [TestQuestion] DROP CONSTRAINT [Test_TestQuestion]
GO


ALTER TABLE [User] DROP CONSTRAINT [Role_User]
GO


ALTER TABLE [User] DROP CONSTRAINT [Group_User]
GO


ALTER TABLE [Post] DROP CONSTRAINT [User_Post]
GO


ALTER TABLE [Post] DROP CONSTRAINT [Thread_Post]
GO


ALTER TABLE [Thread] DROP CONSTRAINT [User_Thread]
GO


ALTER TABLE [Thread] DROP CONSTRAINT [CategoryForum_Thread]
GO


ALTER TABLE [TestResult] DROP CONSTRAINT [User_TestResult]
GO


ALTER TABLE [TestResult] DROP CONSTRAINT [Test_TestResult]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "TestQuestion"                                              */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [TestQuestion] DROP CONSTRAINT [PK_TestQuestion]
GO


/* Drop table */

DROP TABLE [TestQuestion]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Answer"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Answer] DROP CONSTRAINT [PK_Answer]
GO


/* Drop table */

DROP TABLE [Answer]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Question"                                                  */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Question] DROP CONSTRAINT [PK_Question]
GO


/* Drop table */

DROP TABLE [Question]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Menu"                                                      */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Menu] DROP CONSTRAINT [PK_Menu]
GO


/* Drop table */

DROP TABLE [Menu]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Post"                                                      */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Post] DROP CONSTRAINT [PK_Post]
GO


/* Drop table */

DROP TABLE [Post]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "TestResult"                                                */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [TestResult] DROP CONSTRAINT [PK_TestResult]
GO


/* Drop table */

DROP TABLE [TestResult]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Thread"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Thread] DROP CONSTRAINT [PK_Thread]
GO


/* Drop table */

DROP TABLE [Thread]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "[User]"                                                    */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [User] DROP CONSTRAINT [PK_User]
GO


/* Drop table */

DROP TABLE [User]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "CategoryForum"                                             */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [CategoryForum] DROP CONSTRAINT [PK_CategoryForum]
GO


/* Drop table */

DROP TABLE [CategoryForum]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Group"                                                     */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Group] DROP CONSTRAINT [PK_Group]
GO


/* Drop table */

DROP TABLE [Group]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Role"                                                      */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Role] DROP CONSTRAINT [PK_Role]
GO


/* Drop table */

DROP TABLE [Role]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "TestSubject"                                               */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [TestSubject] DROP CONSTRAINT [PK_TestSubject]
GO


/* Drop table */

DROP TABLE [TestSubject]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Test"                                                      */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Test] DROP CONSTRAINT [PK_Test]
GO


/* Drop table */

DROP TABLE [Test]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Subject"                                                   */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Subject] DROP CONSTRAINT [PK_Subject]
GO


/* Drop table */

DROP TABLE [Subject]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "LoginLog"                                                  */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [LoginLog] DROP CONSTRAINT [PK_LoginLog]
GO


/* Drop table */

DROP TABLE [LoginLog]
GO


/* ---------------------------------------------------------------------- */
/* Drop table "Property"                                                  */
/* ---------------------------------------------------------------------- */

/* Drop constraints */

ALTER TABLE [Property] DROP CONSTRAINT [PK_Property]
GO


/* Drop table */

DROP TABLE [Property]
GO

